﻿@model IEnumerable<Etest.Models.Test>

<table>
    <tr>
        <th>
            Професор
        </th>
        <th>
            Курс
        </th>
        <th>
            Дата од
        </th>
        <th>
            Дата до
        </th>
        <th>Број на прашања</th>
        <th></th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Users.UserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Course.name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dateFrom)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dateDue)
        </td>
        <td>
             @Html.DisplayFor(modelItem => item.number_of_questions)
        </td>
        <td>
            @using (Html.BeginForm("GenerateTest", "Test", item, FormMethod.Post))
            {
               <input type="submit" class="btn btn-primary btn-large" value="Реши" />
            }
        </td>

    </tr>
}

</table>
